home *** CD-ROM | disk | FTP | other *** search
Text File | 1997-02-10 | 729 b | 22 lines | [TEXT/ToyS] |
- -- Sample AppleScripts for touchMe, 1996 (C) Mizutori Tetsuya
- -- An applet to change the date time stamp of the given folder
- -- to the newest one of the items contained in the folder.
- -- Let's start to open a target folder!
-
- set theFolder to (choose folder)
-
- tell application "Finder"
- sort items of theFolder by modification date
- set theNewest to the first item of the result
- set theCreationDate to the creation date of theNewest
- set theModificationDate to the modification date of theNewest
- end tell
-
- tell application "touchMe"
- activate
- set prefs creation to {enabled:true, flag:exact, value:theCreationDate}
- set prefs modification to {enabled:true, flag:exact, value:theModificationDate}
- touch theFolder
- quit
- end tell
-